package com.glory.dgcpcpda.adapter;

import androidx.annotation.Nullable;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.glory.dgcpcpda.R;
import com.glory.dgcpcpda.entity.PackageDetailListEntity;

import java.util.List;

/**
 * FileName: PublicAuditListAdapter
 * Author: XJH
 * Date: 2020/6/19 16:23
 * Description:
 * History:
 */
public class PublicAuditListAdapter extends BaseQuickAdapter<PackageDetailListEntity, BaseViewHolder> {
  private boolean mAuditType;

  public PublicAuditListAdapter(@Nullable List<PackageDetailListEntity> data,boolean auditType) {
    super(R.layout.item_bin_info_list,data);
    this.mAuditType = auditType;
  }

  @Override
  protected void convert(BaseViewHolder helper, PackageDetailListEntity item) {
    if (mAuditType){
      helper.setText(R.id.list_tv1,item.getSOURCELOTID());
      helper.setText(R.id.list_tv2,item.getPACKLOTID());
    }else {
      helper.setText(R.id.list_tv1,item.getPACKLOTID());
      helper.setText(R.id.list_tv2,item.getWOID());
    }

    helper.setGone(R.id.list_tv3,false);

  }
}
